<header>
  <div class="top-menubar">
    <div class="topmenu">
      <div class="container">
        <div class="row">
          <div class="col-md-7">
            <ul class="list-inline top-contacts">
              <!-- <li>
                <i class="fa fa-envelope"></i> 邮箱地址: <strong>info@themeborn.com</strong>
              </li>
              <li>
                <i class="fa fa-phone"></i> 客服热线: <strong>(1) 111 222 33</strong>
              </li> -->
            </ul>
          </div> 
          <div class="col-md-5">
            <ul class="list-inline top-data">
              <% if(locals.user){ %>
              <div class="user-logined">
              <div class="dropdown">
                <a href="javascript:;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-nav-img">
                  <div  class="user-head-icon"><img src="<%- locals.user.headimg %>" width="100%" height="100%"></div>
                  <span class="user-nav-name"><%- locals.user.nickname %></span>
                  <span class="caret"></span>
                </a>
                <ul class="dropdown-menu pull-right userdrop" aria-labelledby="dLabel">
                  <a class="dropdown-item" href="/users/userindex/<%- locals.user._id %>">个人主页</a>
                  <a class="dropdown-item" href="/users/userworks/unreleased">我的作品</a>
                  <a class="dropdown-item" href="/users/usercenter">账号设置</a>
                  <a class="dropdown-item" href="/school">进入校园</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="/logout" >退出登录</a>
                </ul>
              </div>
              </div>
              <input type="hidden" id="local-userid" value="<%- locals.user._id %>" />
                <%if(locals.user.noticenum == 0){%>
              <div class="user-notice">
                <a class="user-ts" href="/users/ts" title="通知"><i class="fa fa-bell-o"></i></a>
              </div>
                <%}else{%>
              <div class="user-notice">
                <a class="user-ts" href="/users/ts" title="通知"><i class="fa fa-bell-o"></i> <span class="tsnum"><%- locals.user.noticenum %></span></a>
              </div>
                <%}%>
              <%}else{%>
              <li><a href="#" class="log-top" data-toggle="modal" data-target="#login">登录</a></li>
              <!-- <li>/</li> -->
              <!-- <li><a href="#" class="log-top" data-toggle="modal" data-target="#register">新用户注册</a></li>  -->
              <%}%>
            </ul>
          </div>
        </div>
      </div>
    </div> 
  </div> 
  <!-- Navbar -->
  <nav class="navbar navbar-expand-lg navbar-light" id="mainNav" data-toggle="affix">
    <div class="container">
      <a class="navbar-brand smooth-scroll" href="/">
        <h2><img class="logo" src="/img/icon.png"> <span class="title"><%= title %></span> </h2>
      </a> 
      <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> 
        <span class="navbar-toggler-icon"></span>
      </button>  
      <div class="collapse navbar-collapse" id="navbarResponsive">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item"><a class="smooth-scroll" href="http://i.bnu.edu.cn">回到首页</a></li>
            <li class="nav-item"><a class="smooth-scroll" href="/build/editor.html">开始创作</a></li>
            <li class="nav-item"><a class="smooth-scroll" href="/works">作品展示</a></li>
            <!-- <li class="nav-item"><a class="smooth-scroll" href="/lessons">在线学习</a></li> -->
            <!-- <li class="nav-item"><a class="smooth-scroll" href="/aboutus#contentus">联系我们</a></li> -->
        </ul>  
      </div>
    </div>
  </nav>
</header> 